import request from '../index';

/**
 * 获取无线信息
 * @param {*} type 24:2.4G 5:5G 6:6G
 * @returns 
 */

export function getInfoWireless(type) {
    return request({
        url: '/api/wireless/config',
        method: 'get',
        params: {
            type: type+""
        }
    });
}


/**
 * 
 * @returns 获取默认无限配置
 */
export function getWirelessDefault() {
    return request({
        url: '/api/wireless/default',
        method: 'get'
    });
}

// Wifi Status
export async function setWifiSwitch(params) {
    return request({
        url: '/api/wireless/status',
        method: 'post',
        data: params,
    });
}

// Wifi form Submit
export async function setWifiConfig(params) {
    return request({
        url: '/api/wireless/config',
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'  // 显式指定 JSON 格式
        }
    });
}




